home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-09-30 | 2.1 KB | 61 lines | [TEXT/CWIE] |
- ///--------------------------------------------------------------------------------------
- // Stats.h
- ///--------------------------------------------------------------------------------------
-
- #ifndef __SPRITEWORLD__
- #include "SpriteWorld.h"
- #endif
-
-
- ///--------------------------------------------------------------------------------------
- // Definitions
- ///--------------------------------------------------------------------------------------
-
- #define kStatsHeight 40 // Height of stats area
- #define kLivesNumOffset 73 // Distance from left side of box to first number
- #define kLevelNumOffset 75 // Distance from left side of box to first number
- #define kScoreNumOffset 78 // Distance from left side of box to first number
- #define kStatsVertOffset 9 // Distance from top of each stats box to each number
-
- #define kNumberWidth 13 // How wide each digit is
- #define kNumberHeight 13 // How tall each digit is
-
- #define kLivesPictResID 130 // Resource IDs for the stats graphics
- #define kLevelPictResID 131
- #define kScorePictResID 132
- #define kNumbersPictResID 133
-
-
- typedef enum
- {
- kRightJustify = 0,
- kLeftJustify
- } JustifyType;
-
-
- // This structure is used for each stats box to tell the digit-drawing
- // routines where to draw the numbers, and what number to draw.
- typedef struct
- {
- FramePtr theFrameP; // pointer to the destination frame
- long theNum; // the number to draw
- long oldNum; // the number from the previous frame
- short numDigits; // how many digits can fit in the box
- short horizLoc; // top-left coordinates of where to draw the number
- short vertLoc; // top-left coordinates of where to draw the number
- JustifyType justification;
- } StatsRec, *StatsRecPtr;
-
-
- ///--------------------------------------------------------------------------------------
- // Function Prototypes
- ///--------------------------------------------------------------------------------------
-
- void InitStats( void );
- void DrawPictInStatsArea( short pictID );
- void UpdateStatsArea( void );
- void UpdateStatsNumbers( void );
- void ResetStats( void );
- void UpdateStatsRec( StatsRecPtr statsRecP );
-
-